package com.cragon.services;

import org.springframework.context.Lifecycle;
import org.springframework.stereotype.Component;

@Component
public class Life2 implements Lifecycle {
	@Override
	public void start() {
		System.out.println("Life2 start");
	}

	@Override
	public void stop() {
		System.out.println("Life2 stop");
	}

	/**
     * 此方法用于判断当前类是否正在运行，是则不运行此类的start()方法，否则运行
	 * @return
     */
	@Override
	public boolean isRunning() {
		return false;
	}
}
